﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Devida/Siste.master" AutoEventWireup="false" CodeFile="ReporteFormato4.aspx.vb" Inherits="Devida_ReporteFormato4" Theme="Yahoo-Ocean" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register src="ucAlerta.ascx" TagName="Alerta" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <base target="_self" />
    <link href="../css/EstilosFrm.css" type="text/css" rel="stylesheet" />
    <link href="../css/i_consultas.css" type="text/css" rel="stylesheet" />
    <link href="../css/diseno.css" type="text/css" rel="Stylesheet" />
    <link href="../css/style2.css" type="text/css" rel="stylesheet" />
    <link href="../css/StyleSheet.css" type="text/css" rel="stylesheet" />

    <script src="../js/jsForms/js_Consulta.js" type="text/javascript"></script>
    <script src="../js/js_windowpopup.js" type="text/javascript"></script>
    <script src="../Script/PrintScript.js" type="text/javascript"> </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cph_name" Runat="Server">
    <asp:Label ID="Label1" runat="server" Font-Names="Arial" Font-Size="17px" ForeColor="white" 
    Text="Informe Consolidado Mensual de Avance del Programa" Font-Bold="True" ></asp:Label>    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <canter>
    <div id="Principal" runat="server" style="width: 900px; height: auto; border: 1px solid #FFfff0;">
        <table style="width: 100%;" cellpadding="2" cellspacing="2">
        <tr class="fondoBlanco" align="left">
            <td style="padding-left: 5px; width: 80px;">
                <asp:Label ID="label2" runat="server" CssClass="label">PPER :</asp:Label>
            </td>
            <td style="padding-left: 5px; width: 430px;">
                <asp:DropDownList ID="ddlPPER" runat="server" AutoPostBack="false" CssClass="ddl" Width="400px"></asp:DropDownList>
            </td>
            <td style="padding-left: 5px; width: 85px;">
                <asp:Label ID="label3" runat="server" CssClass="label">Periodo :</asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlPeriodo" runat="server" AutoPostBack="false" CssClass="ddl" Width="120px"></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td colspan="4" style="text-align: left;">
               <asp:UpdatePanel ID="upFiltro" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:ImageButton ID="btnGenerar" runat="server" ImageUrl="~/Imagenes/btnGenerar.png" ValidationGroup="miPrueba" />
                        
                        <asp:UpdateProgress ID="UpdateProgress1" runat="Server" DisplayAfter="0" AssociatedUpdatePanelID="upFiltro" ValidationGroup="miPrueba">
                            <ProgressTemplate>
               <img alt="" border="0" height="25" src="../Imagenes/ajax-loader.gif" />
                <strong style="height: 15px">
                    <span style="font-size: 16pt; color: #f611a4; font-family: Verdana">
                        Generando reporte... Por favor espere.
                    </span>
                </strong>
            </ProgressTemplate>
                        </asp:UpdateProgress>
                     
                        <div id="divReporte" runat="server" style="display:none">                           
                            <table id="Table1" style="width: 100%;" cellpadding="0" cellspacing="0" runat="server">
                                <tr>
                            <td align="left">
                                <cc1:TabContainer ID="TabContainer1" Width="100%" runat="server" ActiveTabIndex="0">
                                    <cc1:TabPanel ID="TabPanel1" runat="server" Width="100%" HeaderText="Informe Consolidado" >                                        
                                        <ContentTemplate>
                                            <div id="Div1" style="border: solid 1px #99aabd; width: 880px; height: 400px; overflow: auto;" runat="server" align="left">
                                                <table id="Table2" style="width: 90%;" runat="server" cellpadding="0" cellspacing="0">
                                                    <tr id="Tr1" runat="server">
                                                        <td id="Td1" class="cabecera" align="left" runat="server">I. Nivel Avance General del PPER
                                                        </td>                                                        
                                                    </tr>                                                    
                                                    <tr id="Tr2" class="fondoBlanco" align="left" runat="server">
                                                        <td id="Td2" runat="server">          
                                                            <asp:GridView ID="gvconsolidado" runat="server" Width="100%" AutoGenerateColumns="false" ShowHeader="true" CssClass="Borde1">
                                                                        <Columns>
                                                                            <asp:TemplateField>
                                                                                <HeaderTemplate>
                                                                                    <table style="width: 859px; padding: 0; margin: 0;" cellpadding="0" cellspacing="0">
                                                                                        <tr>
                                                                                            <td style='width: 195px;' rowspan='2'>Modalidad de Ejec.
                                                                                            </td>
                                                                                            <td colspan='2'>Monto
                                                                                            </td>
                                                                                            <td style="width: 90px;" rowspan='2'>Monto Transferido
                                                                                            </td>
                                                                                            <td colspan='2'>Ejecucion Financiera
                                                                                            </td>
                                                                                            <td style="width: 96px;" rowspan='2'>Ejecucion
                                                                                            </td>
                                                                                            <td rowspan='2'>Financiera
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr> 
                                                                                        <td style="width: 91px;">Total S/.
                                                                                        </td>
                                                                                        <td style="width: 93px;">Programado Acumulado (1)
                                                                                        </td>
                                                                                        <td style="width: 93px;">Monto S/. (2)
                                                                                        </td>
                                                                                        <td style="width: 93px;">%
                                                                                        </td>                                                                                          
                                                                                        </tr>
                                                                                    </table>                                                                                   
                                                                                </HeaderTemplate>                                                                                
                                                                                <HeaderStyle HorizontalAlign="Left" />                                                                                
                                                                                <ItemTemplate>                                                                                    
                                                                                    <asp:HiddenField ID="hfPPER" runat="server" Value='<%# Eval("CODIGO")%>' />                                                                                    
                                                                                    <asp:Label ID="lblTipo1" runat="server" Text='<%# Eval("TIPO_ASIGNACION")%>'></asp:Label>                                                                                                                                                                                                                                                     
                                                                                    <asp:GridView ID="gvDetalle" runat="server" CssClass="Borde1" Width="859px" ShowHeader="false" HeaderStyle-HorizontalAlign="Left" OnRowDataBound="RDB" ShowFooter="false" AutoGenerateColumns="false">
                                                                                        <Columns>    
                                                                                            <asp:TemplateField HeaderText="Ranking">        
                                                                                                <HeaderStyle HorizontalAlign="Left" />        
                                                                                                <ItemTemplate>
                                                                                                    <%# Container.DataItemIndex + 1 %>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle Width="10px" />        
                                                                                            </asp:TemplateField>
                                                                                            <asp:BoundField DataField="TIPO_PROY_ACT_DESC" HeaderText="TIPO ACTIVIDAD" ItemStyle-Width="179px" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                            <asp:BoundField DataField="total" HeaderText="Total" ItemStyle-Width="90px" DataFormatString="{0:N0}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
                                                                                            <asp:BoundField DataField="ACUMULADO" HeaderText="Monto girado acumulado (B)" ItemStyle-Width="91px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}"></asp:BoundField>    
                                                                                            <asp:BoundField DataField="MONTO_TRANSFERIDO" HeaderText="MONTO TRANSFERIDO" ItemStyle-Width="91px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}"></asp:BoundField>    
                                                                                            <asp:BoundField DataField="EJECUTADO" HeaderText="EJECUTADO" ItemStyle-Width="91px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}"></asp:BoundField>
                                                                                            <asp:BoundField DataField="PORC" HeaderText="%" ItemStyle-Width="91px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:P0}"></asp:BoundField>
                                                                                            <asp:BoundField HeaderText="Desempeño (C x D)" ItemStyle-HorizontalAlign="Right"></asp:BoundField>    
                                                                                        </Columns>
                                                                                        <FooterStyle Font-Bold="true" Font-Size="11pt" />
                                                                               </asp:GridView>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                        </Columns>                                                                        
                                                                    </asp:GridView>                                                                        
                                                        </td>                                                        
                                                    </tr>                                                    
                                                </table>
                                            </div>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="TabPanel2" runat="server" Width="900px" HeaderText="Cuadro Desagregado Mensualde avance del PPER">
                                        <ContentTemplate>
                                            <div style="border: solid 1px #99aabd; width: 880px; height: 400px; overflow: auto;">                                                
                                                <asp:GridView ID="gvFormato5" runat="server" Width="2600px" AutoGenerateColumns="false" ShowHeaderWhenEmpty="true">                                                    
                                                    <Columns>                                                        
                                                        <asp:TemplateField Visible="false">                                                            
                                                            <ItemStyle Width="50px" />                                                            
                                                            <ItemTemplate>                                                                
                                                                <asp:Label ID="lblPPER2" runat="server" Text='<%# Eval("descripcion") %>'></asp:Label>                                                                
                                                                <asp:HiddenField ID="hfPPER2" runat="server" Value='<%# Eval("TIPO_PROYECTO_ACTIVIDAD") %>' />                                                                
                                                            </ItemTemplate>                                                            
                                                        </asp:TemplateField>                                                        
                                                        <asp:TemplateField>                                                            
                                                            <HeaderTemplate>                                                                
                                                                <table style="width: 100%; padding: 0; margin: 0;" cellpadding="0" cellspacing="0">                                                                    
                                                                    <tr>                                                                        
                                                                        <td rowspan="2" style="width: 202px">Producto
                                                                        </td>                                                                        
                                                                        <td rowspan="2" style="width: 409px">Entidades Ejecutoras
                                                                        </td>                                                                        
                                                                        <td rowspan="2" style="width: 611px">Nombre de la Actividad o Proyecto
                                                                        </td>                                                                        
                                                                        <td colspan="2">Monto
                                                                        </td>                                                                        
                                                                        <td rowspan="2" style="width: 123px">Monto Transferido
                                                                        </td>                                                                        
                                                                        <td colspan="2">Ejecución Financiera
                                                                        </td>                                                                        
                                                                        <td rowspan="2" style="width: 125px">% Ejecución Física (IAFG)
                                                                        </td>                                                                        
                                                                        <td rowspan="2">Observaciones
                                                                        </td>                                                                        
                                                                    </tr>                                                                    
                                                                    <tr>                                                                        
                                                                        <td style="width: 123px">Total S/.
                                                                        </td>                                                                        
                                                                        <td style="width: 125px">Programación Acumulada (1)
                                                                        </td>                                                                        
                                                                        <td style="width: 123px">Monto S/. (2)
                                                                        </td>                                                                        
                                                                        <td style="width: 123px">% (3)=(2)/(1)
                                                                        </td>                                                                        
                                                                    </tr>                                                                    
                                                                </table>                                                                
                                                                <table style="background-color: #adfb02; width: 100%" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td style="width: 1223px; background-color: #c8c8c8; color: #000000; font-weight: bold; font-size: 11px">TOTAL PPER
                                                                        </td>
                                                                        <td style="width: 123.5px; background-color: #ffffff; text-align: right">
                                                                            <asp:Label ID="lblTotalPPER" runat="server" Font-Size="10px" ForeColor="Black"></asp:Label>
                                                                        </td>
                                                                        <td style="width: 124px; background-color: #ffffff; text-align: right">
                                                                            <asp:Label ID="lblProgramadoPPER" runat="server" Font-Size="10px" ForeColor="Black"></asp:Label>
                                                                        </td>
                                                                        <td style="width: 124px; background-color: #ffffff; text-align: right">
                                                                            <asp:Label ID="lblTransferidoPPER" runat="server" Font-Size="10px" ForeColor="Black"></asp:Label>
                                                                        </td>                                                                        
                                                                        <td style="width: 123.5px; background-color: #ffffff; text-align: right">
                                                                            <asp:Label ID="lblGiradoPPER" runat="server" Font-Size="10px" ForeColor="Black"></asp:Label>
                                                                        </td>
                                                                        <td style="width: 123px; background-color: #ffffff; text-align: right">
                                                                            <asp:Label ID="lblPorcentajePPER" runat="server" Font-Size="10px" ForeColor="Black"></asp:Label>
                                                                        </td>
                                                                        <td style="width: 123.5px; background-color: #ffffff; text-align: right">
                                                                            <asp:Label ID="lblEjecutadoPPER" runat="server" Font-Size="10px" ForeColor="Black"></asp:Label>
                                                                        </td>
                                                                        <td style="background-color: #ffffff; text-align: right">
                                                                            <asp:Label ID="lblObservacionPPER" runat="server" Font-Size="10px" ForeColor="Black"></asp:Label>  
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </HeaderTemplate>
                                                            <HeaderStyle BorderStyle="None" />
                                                            <ItemTemplate>
                                                                <asp:GridView ID="gvDetalle2" runat="server" Width="2600px" ShowHeader="true" OnRowDataBound="RDB2"
                                                                    ShowFooter="false" AutoGenerateColumns="false">
                                                                    <Columns>
                                                                        <asp:TemplateField>
                                                                            <HeaderTemplate>
                                                                                <table style="width: 100%;" cellpadding="0" cellspacing="0">                                                                                    
                                                                                    <tr>
                                                                                        <td style="width: 1222px; background-color: #c8c8c8">
                                                                                            <asp:Label ID="lblTitulo" Font-Size="10px" runat="server"></asp:Label>
                                                                                        </td>
                                                                                        <td style="width: 123px; background-color: #ffffff; text-align: right">    
                                                                                            <asp:Label ID="lblTotal" Font-Size="10px" runat="server"></asp:Label>   
                                                                                        </td>
                                                                                        <td style="width: 124px; background-color: #ffffff; text-align: right">   
                                                                                            <asp:Label ID="lblProgramado" Font-Size="10px" runat="server"></asp:Label>    
                                                                                        </td>
                                                                                        <td style="width: 123.5px; background-color: #ffffff; text-align: right">    
                                                                                            <asp:Label ID="lblTransferido" Font-Size="10px" runat="server"></asp:Label>    
                                                                                        </td>
                                                                                        <td style="width: 123.5px; background-color: #ffffff; text-align: right">    
                                                                                            <asp:Label ID="lblGirado" Font-Size="10px" runat="server"></asp:Label>    
                                                                                        </td>
                                                                                        <td style="width: 123px; background-color: #ffffff; text-align: right">    
                                                                                            <asp:Label ID="lblPorcentaje" Font-Size="10px" runat="server"></asp:Label>    
                                                                                        </td>
                                                                                        <td style="width: 123.5px; background-color: #ffffff; text-align: right"></td>
                                                                                        <td style="background-color: #ffffff"></td>
                                                                                    </tr>                                                                                    
                                                                                </table>                                                                                
                                                                            </HeaderTemplate>                                                                            
                                                                            <ItemStyle Width="200px" />                                                                            
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblPPER2" Width="200px" runat="server" Text='<%# Eval("descripcion") %>'></asp:Label>
                                                                                <asp:HiddenField ID="hfCOD" runat="server" Value='<%# Eval("CODIGO") %>' />
                                                                                <asp:HiddenField ID="Hftip" runat="server" Value='<%# Eval("TIPO_PROYECTO_ACTIVIDAD") %>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>                                                                        
                                                                        <asp:TemplateField>
                                                                            <HeaderTemplate>
                                                                                Detalle
                                                                            </HeaderTemplate>
                                                                            <HeaderStyle BorderStyle="None" />                                                                            
                                                                            <ItemTemplate>                                                                                
                                                                                <asp:GridView ID="gvDetalle3" runat="server" Width="2400px" ShowHeader="true" OnRowDataBound="RDB3"
                                                                                    ShowFooter="false" AutoGenerateColumns="false">                                                                                    
                                                                                    <Columns>
                                                                                        <asp:BoundField DataField="DESCRIPCION" HeaderText="EJECUTOR" ItemStyle-Width="400px" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                        <asp:BoundField DataField="NOMBRE" HeaderText="PROYECTO/ACTIVIDAD" ItemStyle-Width="600px" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                        <asp:BoundField DataField="TOTAL" HeaderText="TOTAL" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}"></asp:BoundField>
                                                                                        <asp:BoundField DataField="MONTO_PROGRAMADO" HeaderText="PROGRAMADO" ItemStyle-Width="120px" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
                                                                                        <asp:BoundField DataField="MONTO_TRANSFERIDO" HeaderText="TRANSFERIDO" ItemStyle-Width="120px" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
                                                                                        <asp:BoundField DataField="MONTO_GIRADO" HeaderText="MONTO" ItemStyle-Width="120px" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
                                                                                        <asp:BoundField DataField="PORCENT" HeaderText="%" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:P0}"></asp:BoundField>
                                                                                        <asp:BoundField DataField="PORCENT" HeaderText="% EJECUCION" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
                                                                                        <asp:BoundField DataField="OBSERVACIONES" HeaderText="OBSERVACIONES" ItemStyle-Width="620px" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                    </Columns>
                                                                                    <FooterStyle Font-Bold="true" Font-Size="11pt" />
                                                                                </asp:GridView>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                    <FooterStyle Font-Bold="true" Font-Size="11pt" />
                                                                </asp:GridView>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                </cc1:TabContainer>
                            </td>
                        </tr>
                            </table>
                            <table style="width: 900px">
                        <tr>
                            <td align="left">
                                <asp:ImageButton ID="btn_guardar" runat="server" ToolTip="Guardar Avance Financiero Semanal"
                                    ImageUrl="~/Imagenes/btnGuardar.png" Style="height: 23px" ValidationGroup="miPrueba" />
                            </td>
                            <td align="center">
                                <asp:ImageButton ID="btnWord" runat="server" ImageUrl="~/Imagenes/btnWord.png" />
                            </td>
                            <td align="right">
                                <asp:ImageButton ID="btnCerrar" runat="server" ImageUrl="~/Imagenes/btnSalir.png"
                                    ToolTip="Salir" />
                            </td>
                        </tr>
                    </table>
                        </div>                        
                    </ContentTemplate>
                    <Triggers>
                         <asp:AsyncPostBackTrigger ControlID="btnGenerar" EventName="Click" />
                     </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
    </div>
    </canter>
     
     <uc1:Alerta id="alerta" runat="server"></uc1:Alerta>       

</asp:Content>

